/*
 * EnchantedMazeFactory.h
 *
 *  Created on: Jan 8, 2013
 *      Author: quanpv
 */

#ifndef ENCHANTEDMAZEFACTORY_H_
#define ENCHANTEDMAZEFACTORY_H_

#include "MazeFactory.h"
#include "EnchantedRoom.h"
#include "DoorNeedingSpell.h"

class Spell;
class EnchantedMazeFactory: public MazeFactory {
public:
	EnchantedMazeFactory();
	virtual ~EnchantedMazeFactory();

	virtual boost::shared_ptr<Room> MakeRoom(int n) const
	{
		boost::shared_ptr<EnchantedRoom> aRoom(new EnchantedRoom(n, CastSpell()));
		return aRoom;
	}

	virtual boost::shared_ptr<Door> MakeDoor(Room* r1, Room* r2) const
	{
		boost::shared_ptr<DoorNeedingSpell> aDoor(new DoorNeedingSpell(r1, r2));
		return aDoor;
	}

protected:
	Spell* CastSpell() const;

};

#endif /* ENCHANTEDMAZEFACTORY_H_ */
